<?php
class Register_model extends CI_Model {

    var $uname   = '';
    var $password = '';
    var $address    = '';

    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }
    
    function get_last_ten_entries()
    {
        $query = $this->db->get('register', 10);
        return $query->result();
    } 

    function insert_entry()
    {
        $this->uname   = $_POST['uname']; // please read the below note
        $this->password = $_POST['pwd'];
		$this->address = $_POST['addr'];
        //$this->date    = time();

        $this->db->insert('register', $this);
    }

   
}

?>